package PageObj;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;


/**
 * Created by boris on 31.05.14.
 */
public class LoginPage extends AbstractPage {



    @FindBy(id="quick_email")
    private WebElement emailInput;

    @FindBy(id="quick_pass")
    private WebElement passwordInput;

    @FindBy(id="quick_login_button")
    private WebElement loginBtn;

    public LoginPage(WebDriver webDriver) {
        super(webDriver);
    }

    public void setEmail(String emailInput) {
        this.emailInput.clear();
        this.emailInput.sendKeys("123");
    }

    public String getEmail() {
        return this.emailInput.getText();
    }

    public void login() {
        this.loginBtn.click();
    }


    public String getUrl() {
        return webDriver.getCurrentUrl();
    }
}
